import "package:flutter/material.dart";

import "../../../utils/screenutil/fit.dart";

class TipsWidget extends StatelessWidget {
  List listItem = ["等待安装", "安装失败", "权限不足"];
  int state;

  TipsWidget(int state) {
    this.state = state;
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      height: double.infinity,
      color: state > listItem.length ? Color.fromRGBO(0, 0, 0, .3) : null,
      child: state < listItem.length
          ? Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                state != 0
                    ? Icon(Icons.error, size: 180.f, color: Colors.red)
                    : Icon(Icons.extension, size: 180.f, color: Colors.blue),
                Text("${listItem[state]}")
              ],
            )
          : SizedBox.shrink(),
    );
  }
}
